Import pub.win32

Global NewtonCreate:Byte Ptr(NewtonAllocMemory:Byte Ptr(sizeInBytes:Int),NewtonFreeMemory(_ptr:Byte Ptr,sizeInBytes:Int)) "c"
Global NewtonDestroy(newtonWorld:Byte Ptr) "c"
Global NewtonDestroyAllBodies(newtonWorld:Byte Ptr) "c"
Global NewtonGetMemoryUsed:Int() "c"
Global NewtonUpdate(newtonWorld:Byte Ptr,timestep:Float) "c"
Global NewtonInvalidateCache(newtonWorld:Byte Ptr) "c"
Global NewtonCollisionUpdate(newtonWorld:Byte Ptr) "c"
Global NewtonSetSolverModel(newtonWorld:Byte Ptr,model:Int) "c"
Global NewtonSetPlatformArchitecture(newtonWorld:Byte Ptr,mode:Int) "c"
Global NewtonGetPlatformArchitecture:Int(newtonWorld:Byte Ptr,description:Byte Ptr) "c"
Global NewtonSetMultiThreadSolverOnSingleIsland(newtonWorld:Byte Ptr,mode:Int) "c"
Global NewtonSetPerformanceClock(newtonWorld:Byte Ptr,NewtonGetTicksCountCallback:Int()) "c"
Global NewtonReadPerformanceTicks:Int(newtonWorld:Byte Ptr,thread:Int,performanceEntry:Int) "c"
Global NewtonWorldCriticalSectionLock(newtonWorld:Byte Ptr) "c"
Global NewtonWorldCriticalSectionUnlock(newtonWorld:Byte Ptr) "c"
Global NewtonSetThreadsCount(newtonWorld:Byte Ptr,threads:Int) "c"
Global NewtonGetThreadsCount:Int(newtonWorld:Byte Ptr) "c"
Global NewtonSetFrictionModel(newtonWorld:Byte Ptr,model:Int) "c"
Global NewtonSetMinimumFrameRate(newtonWorld:Byte Ptr,frameRate:Float) "c"
Global NewtonSetBodyLeaveWorldEvent(newtonWorld:Byte Ptr,NewtonBodyLeaveWorld(body:Byte Ptr,threadIndex:Int)) "c"
Global NewtonSetWorldSize(newtonWorld:Byte Ptr,minPoint:Float Ptr,maxPoint:Float Ptr) "c"
Global NewtonSetIslandUpdateEvent(newtonWorld:Byte Ptr,NewtonIslandUpdate:Int(islandHandle:Byte Ptr,bodyCount:Int)) "c"
Global NewtonWorldForEachJointDo(newtonWorld:Byte Ptr,NewtonJointIterator(joint:Byte Ptr)) "c"
Global NewtonWorldForEachBodyInAABBDo(newtonWorld:Byte Ptr,p0:Float Ptr,p1:Float Ptr,NewtonBodyIterator(body:Byte Ptr)) "c"
Global NewtonWorldSetUserData(newtonWorld:Byte Ptr,userData:Byte Ptr) "c"
Global NewtonWorldGetUserData:Byte Ptr(newtonWorld:Byte Ptr) "c"
Global NewtonWorldGetVersion:Int(newtonWorld:Byte Ptr) "c"
Global NewtonWorldRayCast(newtonWorld:Byte Ptr,p0:Float Ptr,p1:Float Ptr,NewtonWorldRayFilterCallback:Float(body:Byte Ptr,hitNormal:Float Ptr,collisionID:Int,userData:Byte Ptr,intersectParam:Float),userData:Byte Ptr,NewtonWorldRayPrefilterCallback:Int(body:Byte Ptr,collision:Byte Ptr,userData:Byte Ptr)) "c"
Global NewtonWorldConvexCast:Int(newtonWorld:Byte Ptr,matrix:Float Ptr,target:Float Ptr,shape:Byte Ptr,hitParam:Float Ptr,userData:Byte Ptr,NewtonWorldRayPrefilterCallback:Int(body:Byte Ptr,collision:Byte Ptr,userData:Byte Ptr),info:Byte Ptr,maxContactsCount:Int) "c"
Global NewtonGetBodyCount:Int(newtonWorld:Byte Ptr) "c"
Global NewtonIslandGetBody:Byte Ptr(island:Byte Ptr,bodyIndex:Int) "c"
Global NewtonIslandGetBodyAABB(island:Byte Ptr,bodyIndex:Int,p0:Float Ptr,p1:Float Ptr) "c"
Global NewtonMaterialCreateGroupID:Int(newtonWorld:Byte Ptr) "c"
Global NewtonMaterialGetDefaultGroupID:Int(newtonWorld:Byte Ptr) "c"
Global NewtonMaterialDestroyAllGroupID(newtonWorld:Byte Ptr) "c"
Global NewtonMaterialGetUserData:Byte Ptr(newtonWorld:Byte Ptr,id0:Int,id1:Int) "c"
Global NewtonMaterialSetSurfaceThickness(newtonWorld:Byte Ptr,id0:Int,id1:Int,thickness:Float) "c"
Global NewtonMaterialSetContinuousCollisionMode(newtonWorld:Byte Ptr,id0:Int,id1:Int,state:Int) "c"
Global NewtonMaterialSetCollisionCallback(newtonWorld:Byte Ptr,id0:Int,id1:Int,userData:Byte Ptr,NewtonOnAABBOverlap:Int(material:Byte Ptr,body0:Byte Ptr,body1:Byte Ptr,threadIndex:Int),NewtonContactProcess(contact:Byte Ptr,timestep:Float,threadIndex:Int)) "c"
Global NewtonMaterialSetDefaultSoftness(newtonWorld:Byte Ptr,id0:Int,id1:Int,value:Float) "c"
Global NewtonMaterialSetDefaultElasticity(newtonWorld:Byte Ptr,id0:Int,id1:Int,elasticCoef:Float) "c"
Global NewtonMaterialSetDefaultCollidable(newtonWorld:Byte Ptr,id0:Int,id1:Int,state:Int) "c"
Global NewtonMaterialSetDefaultFriction(newtonWorld:Byte Ptr,id0:Int,id1:Int,staticFriction:Float,kineticFriction:Float) "c"
Global NewtonWorldGetFirstMaterial:Byte Ptr(world:Byte Ptr) "c"
Global NewtonWorldGetNextMaterial:Byte Ptr(world:Byte Ptr,material:Byte Ptr) "c"
Global NewtonWorldGetFirstBody:Byte Ptr(world:Byte Ptr) "c"
Global NewtonWorldGetNextBody:Byte Ptr(world:Byte Ptr,curBody:Byte Ptr) "c"
Global NewtonMaterialGetMaterialPairUserData:Byte Ptr(material:Byte Ptr) "c"
Global NewtonMaterialGetContactFaceAttribute:Int(material:Byte Ptr) "c"
Global NewtonMaterialGetBodyCollisionID:Int(material:Byte Ptr,body:Byte Ptr) "c"
Global NewtonMaterialGetContactNormalSpeed:Float(material:Byte Ptr) "c"
Global NewtonMaterialGetContactForce(material:Byte Ptr,force:Float Ptr) "c"
Global NewtonMaterialGetContactPositionAndNormal(material:Byte Ptr,posit:Float Ptr,normal:Float Ptr) "c"
Global NewtonMaterialGetContactTangentDirections(material:Byte Ptr,dir0:Float Ptr,dir1:Float Ptr) "c"
Global NewtonMaterialGetContactTangentSpeed:Float(material:Byte Ptr,index:Int) "c"
Global NewtonMaterialSetContactSoftness(material:Byte Ptr,softness:Float) "c"
Global NewtonMaterialSetContactElasticity(material:Byte Ptr,restitution:Float) "c"
Global NewtonMaterialSetContactFrictionState(material:Byte Ptr,state:Int,index:Int) "c"
Global NewtonMaterialSetContactFrictionCoef(material:Byte Ptr,staticFrictionCoef:Float,kineticFrictionCoef:Float,index:Int) "c"
Global NewtonMaterialSetContactNormalAcceleration(material:Byte Ptr,accel:Float) "c"
Global NewtonMaterialSetContactNormalDirection(material:Byte Ptr,directionVector:Float Ptr) "c"
Global NewtonMaterialSetContactTangentAcceleration(material:Byte Ptr,accel:Float,index:Int) "c"
Global NewtonMaterialContactRotateTangentDirections(material:Byte Ptr,directionVector:Float Ptr) "c"
Global NewtonCreateNull:Byte Ptr(newtonWorld:Byte Ptr) "c"
Global NewtonCreateSphere:Byte Ptr(newtonWorld:Byte Ptr,radiusX:Float,radiusY:Float,radiusZ:Float,offsetMatrix:Byte Ptr) "c"
Global NewtonCreateBox:Byte Ptr(newtonWorld:Byte Ptr,dx:Float,dy:Float,dz:Float,offsetMatrix:Byte Ptr) "c"
Global NewtonCreateCone:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) "c"
Global NewtonCreateCapsule:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) "c"
Global NewtonCreateCylinder:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) "c"
Global NewtonCreateChamferCylinder:Byte Ptr(newtonWorld:Byte Ptr,radius:Float,height:Float,offsetMatrix:Byte Ptr) "c"
Global NewtonCreateConvexHull:Byte Ptr(newtonWorld:Byte Ptr,count:Int,vertexCloud:Float Ptr,strideInBytes:Int,tolerance:Float,offsetMatrix:Byte Ptr) "c"
Global NewtonCreateConvexHullFromMesh:Byte Ptr(newtonWorld:Byte Ptr,mesh:Byte Ptr,tolerance:Float) "c"
Global NewtonCreateConvexHullModifier:Byte Ptr(newtonWorld:Byte Ptr,convexHullCollision:Byte Ptr) "c"
Global NewtonConvexHullModifierGetMatrix(convexHullCollision:Byte Ptr,matrix:Float Ptr) "c"
Global NewtonConvexHullModifierSetMatrix(convexHullCollision:Byte Ptr,matrix:Float Ptr) "c"
Global NewtonCollisionIsTriggerVolume:Int(convexCollision:Byte Ptr) "c"
Global NewtonCollisionSetAsTriggerVolume(convexCollision:Byte Ptr,trigger:Int) "c"
Global NewtonConvexCollisionSetUserID(convexCollision:Byte Ptr,id:Int) "c"
Global NewtonConvexCollisionGetUserID:Int(convexCollision:Byte Ptr) "c"
Global NewtonConvexCollisionCalculateVolume:Float(convexCollision:Byte Ptr) "c"
Global NewtonConvexCollisionCalculateInertialMatrix(convexCollision:Byte Ptr,inertia:Float Ptr,origin:Float Ptr) "c"
Global NewtonCollisionMakeUnique(newtonWorld:Byte Ptr,collision:Byte Ptr) "c"
Global NewtonReleaseCollision(newtonWorld:Byte Ptr,collision:Byte Ptr) "c"
Global NewtonAddCollisionReference:Int(collision:Byte Ptr) "c"
Global NewtonCreateCompoundCollision:Byte Ptr(newtonWorld:Byte Ptr,count:Int,collisionPrimitiveArray:Byte Ptr) "c"
Global NewtonCreateCompoundCollisionFromMesh:Byte Ptr(newtonWorld:Byte Ptr,mesh:Byte Ptr,concavity:Float,maxShapeCount:Int) "c"
Global NewtonCreateUserMeshCollision:Byte Ptr(newtonWorld:Byte Ptr,minBox:Byte Ptr,maxBox:Byte Ptr,userData:Byte Ptr,NewtonUserMeshCollisionCollideCallback(collideDescData:Byte Ptr),NewtonUserMeshCollisionRayHitCallback:Float(lineDescData:Byte Ptr),NewtonUserMeshCollisionDestroyCallback(userData:Byte Ptr),NewtonUserMeshCollisionGetCollisionInfo(userData:Byte Ptr,infoRecord:Byte Ptr),NewtonUserMeshCollisionGetFacesInAABB(userData:Byte Ptr,p0:Float Ptr,p1:Float Ptr,vertexArray:Byte Ptr,vertexCount:Byte Ptr,vertexStrideInBytes:Byte Ptr,indexList:Byte Ptr,maxIndexCount:Int,userDataList:Byte Ptr)) "c"
Global NewtonCreateSceneCollision:Byte Ptr(newtonWorld:Byte Ptr,size:Float) "c"
Global NewtonSceneCollisionCreateProxy:Byte Ptr(scene:Byte Ptr,collision:Byte Ptr) "c"
Global NewtonSceneCollisionDestroyProxy(scene:Byte Ptr,Proxy:Byte Ptr) "c"
Global NewtonSceneProxySetMatrix(proxy:Byte Ptr,matrix:Float Ptr) "c"
Global NewtonSceneProxyGetMatrix(proxy:Byte Ptr,matrix:Float Ptr) "c"
Global NewtonCreateCollisionFromSerialization:Byte Ptr(newtonWorld:Byte Ptr,NewtonDeserialize(serializeHandle:Byte Ptr,buffer:Byte Ptr,size:Int),serializeHandle:Byte Ptr) "c"
Global NewtonCollisionSerialize(collision:Byte Ptr,NewtonSerialize(serializeHandle:Byte Ptr,buffer:Byte Ptr,size:Int),serializeHandle:Byte Ptr) "c"
Global NewtonCollisionGetInfo(collision:Byte Ptr,collisionInfo:Byte Ptr) "c"
Global NewtonCreateHeightFieldCollision:Byte Ptr(newtonWorld:Byte Ptr,width:Int,height:Int,gridsDiagonals:Int,elevationMap:Byte Ptr,attributeMap:Byte Ptr,horizontalScale:Float,verticalScale:Float) "c"
Global NewtonCreateTreeCollision:Byte Ptr(newtonWorld:Byte Ptr) "c"
Global NewtonTreeCollisionSetUserRayCastCallback(treeCollision:Byte Ptr,NewtonCollisionTreeRayCastCallback:Float(interception:Float,normal:Float Ptr,faceId:Int,usedData:Byte Ptr)) "c"
Global NewtonTreeCollisionBeginBuild(treeCollision:Byte Ptr) "c"
Global NewtonTreeCollisionAddFace(treeCollision:Byte Ptr,vertexCount:Int,vertexPtr:Float Ptr,strideInBytes:Int,faceAttribute:Int) "c"
Global NewtonTreeCollisionEndBuild(treeCollision:Byte Ptr,optimize:Int) "c"
Global NewtonTreeCollisionGetFaceAtribute:Int(treeCollision:Byte Ptr,faceIndexArray:Byte Ptr) "c"
Global NewtonTreeCollisionSetFaceAtribute(treeCollision:Byte Ptr,faceIndexArray:Byte Ptr,attribute:Int) "c"
Global NewtonTreeCollisionGetVertexListIndexListInAABB:Int(treeCollision:Byte Ptr,p0:Float Ptr,p1:Float Ptr,vertexArray:Byte Ptr,vertexCount:Byte Ptr,vertexStrideInBytes:Byte Ptr,indexList:Byte Ptr,maxIndexCount:Int,faceAttribute:Byte Ptr) "c"
Global NewtonStaticCollisionSetDebugCallback(staticCollision:Byte Ptr,NewtonTreeCollisionCallback(bodyWithTreeCollision:Byte Ptr,body:Byte Ptr,faceID:Int,vertexCount:Int,vertex:Float Ptr,vertexStrideInBytes:Int)) "c"
Global NewtonCollisionPointDistance:Int(newtonWorld:Byte Ptr,point:Byte Ptr,collision:Byte Ptr,matrix:Float Ptr,contact:Float Ptr,normal:Float Ptr) "c"
Global NewtonCollisionClosestPoint:Int(newtonWorld:Byte Ptr,collisionA:Byte Ptr,matrixA:Float Ptr,collisionB:Byte Ptr,matrixB:Float Ptr,contactA:Float Ptr,contactB:Float Ptr,normalAB:Float Ptr) "c"
Global NewtonCollisionCollide:Int(newtonWorld:Byte Ptr,maxSize:Int,collisionA:Byte Ptr,matrixA:Float Ptr,collisionB:Byte Ptr,matrixB:Float Ptr,contacts:Float Ptr,normals:Float Ptr,penetration:Float Ptr) "c"
Global NewtonCollisionCollideContinue:Int(newtonWorld:Byte Ptr,maxSize:Int,timestep:Byte Ptr,collisionA:Byte Ptr,matrixA:Float Ptr,velocA:Float Ptr,omegaA:Float Ptr,collisionB:Byte Ptr,matrixB:Float Ptr,velocB:Float Ptr,omegaB:Float Ptr,timeOfImpact:Float Ptr,contacts:Float Ptr,normals:Float Ptr,penetration:Float Ptr) "c"
Global NewtonCollisionSupportVertex(collision:Byte Ptr,dir:Float Ptr,vertex:Float Ptr) "c"
Global NewtonCollisionRayCast:Float(collision:Byte Ptr,p0:Float Ptr,p1:Float Ptr,normals:Float Ptr,attribute:Byte Ptr) "c"
Global NewtonCollisionCalculateAABB(collision:Byte Ptr,matrix:Byte Ptr,p0:Float Ptr,p1:Float Ptr) "c"
Global NewtonCollisionForEachPolygonDo(collision:Byte Ptr,matrix:Float Ptr,NewtonCollisionIterator(userData:Byte Ptr,vertexCount:Int,faceArray:Float Ptr,faceId:Int),useData:Byte Ptr) "c"
Global NewtonGetEulerAngle(matrix:Float Ptr,eulersAngles:Float Ptr) "c"
Global NewtonSetEulerAngle(eulersAngles:Float Ptr,matrix:Float Ptr) "c"
Global NewtonCalculateSpringDamperAcceleration:Float(dt:Float,ks:Float,x:Float,kd:Float,s:Float) "c"
Global NewtonCreateBody:Byte Ptr(newtonWorld:Byte Ptr,collision:Byte Ptr) "c"
Global NewtonDestroyBody(newtonWorld:Byte Ptr,body:Byte Ptr) "c"
Global NewtonBodyAddForce(body:Byte Ptr,force:Float Ptr) "c"
Global NewtonBodyAddTorque(body:Byte Ptr,torque:Float Ptr) "c"
Global NewtonBodyCalculateInverseDynamicsForce(body:Byte Ptr,timestep:Float,desiredVeloc:Float Ptr,forceOut:Float Ptr) "c"
Global NewtonBodySetMatrix(body:Byte Ptr,matrix:Float Ptr) "c"
Global NewtonBodySetMatrixRecursive(body:Byte Ptr,matrix:Float Ptr) "c"
Global NewtonBodySetMassMatrix(body:Byte Ptr,mass:Float,Ixx:Float,Iyy:Float,Izz:Float) "c"
Global NewtonBodySetMaterialGroupID(body:Byte Ptr,id:Int) "c"
Global NewtonBodySetContinuousCollisionMode(body:Byte Ptr,state:Int) "c"
Global NewtonBodySetJointRecursiveCollision(body:Byte Ptr,state:Int) "c"
Global NewtonBodySetOmega(body:Byte Ptr,omega:Float Ptr) "c"
Global NewtonBodySetVelocity(body:Byte Ptr,velocity:Float Ptr) "c"
Global NewtonBodySetForce(body:Byte Ptr,force:Float Ptr) "c"
Global NewtonBodySetTorque(body:Byte Ptr,torque:Float Ptr) "c"
Global NewtonBodySetCentreOfMass(body:Byte Ptr,com:Float Ptr) "c"
Global NewtonBodySetLinearDamping(body:Byte Ptr,linearDamp:Float) "c"
Global NewtonBodySetAngularDamping(body:Byte Ptr,angularDamp:Float Ptr) "c"
Global NewtonBodySetUserData(body:Byte Ptr,userData:Object) "c"
Global NewtonBodySetCollision(body:Byte Ptr,collision:Byte Ptr) "c"
Global NewtonBodyGetSleepState:Int(body:Byte Ptr) "c"
Global NewtonBodyGetAutoSleep:Int(body:Byte Ptr) "c"
Global NewtonBodySetAutoSleep(body:Byte Ptr,state:Int) "c"
Global NewtonBodyGetFreezeState:Int(body:Byte Ptr) "c"
Global NewtonBodySetFreezeState(body:Byte Ptr,state:Int) "c"
Global NewtonBodySetTransformCallback(body:Byte Ptr,NewtonSetTransform(body:Byte Ptr,matrix:Float Ptr,threadIndex:Int)) "c"
Global NewtonBodySetDestructorCallback(body:Byte Ptr,NewtonBodyDestructor(body:Byte Ptr)) "c"
Global NewtonBodySetForceAndTorqueCallback(body:Byte Ptr,NewtonApplyForceAndTorque(body:Byte Ptr,timestep:Float,threadIndex:Int)) "c"
Global NewtonBodyGetForceAndTorqueCallback:Byte Ptr(body:Byte Ptr) "c"
Global NewtonBodyGetUserData:Object(body:Byte Ptr) "c"
Global NewtonBodyGetWorld:Byte Ptr(body:Byte Ptr) "c"
Global NewtonBodyGetCollision:Byte Ptr(body:Byte Ptr) "c"
Global NewtonBodyGetMaterialGroupID:Int(body:Byte Ptr) "c"
Global NewtonBodyGetContinuousCollisionMode:Int(body:Byte Ptr) "c"
Global NewtonBodyGetJointRecursiveCollision:Int(body:Byte Ptr) "c"
Global NewtonBodyGetMatrix(body:Byte Ptr,matrix:Float Ptr) "c"
Global NewtonBodyGetRotation(body:Byte Ptr,rotation:Float Ptr) "c"
Global NewtonBodyGetMassMatrix(body:Byte Ptr,mass:Float Ptr,Ixx:Float Ptr,Iyy:Float Ptr,Izz:Float Ptr) "c"
Global NewtonBodyGetInvMass(body:Byte Ptr,invMass:Float Ptr,invIxx:Float Ptr,invIyy:Float Ptr,invIzz:Float Ptr) "c"
Global NewtonBodyGetOmega(body:Byte Ptr,vector:Float Ptr) "c"
Global NewtonBodyGetVelocity(body:Byte Ptr,vector:Float Ptr) "c"
Global NewtonBodyGetForce(body:Byte Ptr,vector:Float Ptr) "c"
Global NewtonBodyGetTorque(body:Byte Ptr,vector:Float Ptr) "c"
Global NewtonBodyGetForceAcc(body:Byte Ptr,vector:Float Ptr) "c"
Global NewtonBodyGetTorqueAcc(body:Byte Ptr,vector:Float Ptr) "c"
Global NewtonBodyGetCentreOfMass(body:Byte Ptr,com:Float Ptr) "c"
Global NewtonBodyGetLinearDamping:Float(body:Byte Ptr) "c"
Global NewtonBodyGetAngularDamping(body:Byte Ptr,vector:Float Ptr) "c"
Global NewtonBodyGetAABB(body:Byte Ptr,p0:Float Ptr,p1:Float Ptr) "c"
Global NewtonBodyGetFirstJoint:Byte Ptr(body:Byte Ptr) "c"
Global NewtonBodyGetNextJoint:Byte Ptr(body:Byte Ptr,joint:Byte Ptr) "c"
Global NewtonBodyGetFirstContactJoint:Byte Ptr(body:Byte Ptr) "c"
Global NewtonBodyGetNextContactJoint:Byte Ptr(body:Byte Ptr,contactJoint:Byte Ptr) "c"
Global NewtonContactJointGetFirstContact:Byte Ptr(contactJoint:Byte Ptr) "c"
Global NewtonContactJointGetNextContact:Byte Ptr(contactJoint:Byte Ptr,contact:Byte Ptr) "c"
Global NewtonContactJointGetContactCount:Int(contactJoint:Byte Ptr) "c"
Global NewtonContactJointRemoveContact(contactJoint:Byte Ptr,contact:Byte Ptr) "c"
Global NewtonContactGetMaterial:Byte Ptr(contact:Byte Ptr) "c"
Global NewtonBodyAddBuoyancyForce(body:Byte Ptr,fluidDensity:Float,fluidLinearViscosity:Float,fluidAngularViscosity:Float,gravityVector:Float Ptr,NewtonGetBuoyancyPlane:Int(collisionID:Byte Ptr,context:Byte Ptr,globalSpaceMatrix:Float Ptr,globalSpacePlane:Float Ptr),context:Byte Ptr) "c"
Global NewtonBodyAddImpulse(body:Byte Ptr,pointDeltaVeloc:Float Ptr,pointPosit:Float Ptr) "c"
Global NewtonJointGetUserData:Byte Ptr(joint:Byte Ptr) "c"
Global NewtonJointSetUserData(joint:Byte Ptr,userData:Byte Ptr) "c"
Global NewtonJointGetBody0:Byte Ptr(joint:Byte Ptr) "c"
Global NewtonJointGetBody1:Byte Ptr(joint:Byte Ptr) "c"
Global NewtonJointGetInfo(joint:Byte Ptr,info:Byte Ptr) "c"
Global NewtonJointGetCollisionState:Int(joint:Byte Ptr) "c"
Global NewtonJointSetCollisionState(joint:Byte Ptr,state:Int) "c"
Global NewtonJointGetStiffness:Float(joint:Byte Ptr) "c"
Global NewtonJointSetStiffness(joint:Byte Ptr,state:Float) "c"
Global NewtonDestroyJoint(newtonWorld:Byte Ptr,joint:Byte Ptr) "c"
Global NewtonJointSetDestructor(joint:Byte Ptr,NewtonConstraintDestructor(me:Byte Ptr)) "c"
Global NewtonConstraintCreateBall:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) "c"
Global NewtonBallSetUserCallback(ball:Byte Ptr,NewtonBallCallBack(ball:Byte Ptr,timestep:Float)) "c"
Global NewtonBallGetJointAngle(ball:Byte Ptr,angle:Float Ptr) "c"
Global NewtonBallGetJointOmega(ball:Byte Ptr,omega:Float Ptr) "c"
Global NewtonBallGetJointForce(ball:Byte Ptr,force:Float Ptr) "c"
Global NewtonBallSetConeLimits(ball:Byte Ptr,pin:Float Ptr,maxConeAngle:Float,maxTwistAngle:Float) "c"
Global NewtonConstraintCreateHinge:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) "c"
Global NewtonHingeSetUserCallback(hinge:Byte Ptr,NewtonHingeCallBack:Int(hinge:Byte Ptr,desc:Byte Ptr)) "c"
Global NewtonHingeGetJointAngle:Float(hinge:Byte Ptr) "c"
Global NewtonHingeGetJointOmega:Float(hinge:Byte Ptr) "c"
Global NewtonHingeGetJointForce(hinge:Byte Ptr,force:Float Ptr) "c"
Global NewtonHingeCalculateStopAlpha:Float(hinge:Byte Ptr,desc:Byte Ptr,angle:Float) "c"
Global NewtonConstraintCreateSlider:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) "c"
Global NewtonSliderSetUserCallback(slider:Byte Ptr,NewtonSliderCallBack:Int(slider:Byte Ptr,desc:Byte Ptr)) "c"
Global NewtonSliderGetJointPosit:Float(slider:Byte Ptr) "c"
Global NewtonSliderGetJointVeloc:Float(slider:Byte Ptr) "c"
Global NewtonSliderGetJointForce(slider:Byte Ptr,force:Float Ptr) "c"
Global NewtonSliderCalculateStopAccel:Float(slider:Byte Ptr,desc:Byte Ptr,position:Float) "c"
Global NewtonConstraintCreateCorkscrew:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) "c"
Global NewtonCorkscrewSetUserCallback(corkscrew:Byte Ptr,NewtonCorkscrewCallBack:Int(corkscrew:Byte Ptr,desc:Byte Ptr)) "c"
Global NewtonCorkscrewGetJointPosit:Float(corkscrew:Byte Ptr) "c"
Global NewtonCorkscrewGetJointAngle:Float(corkscrew:Byte Ptr) "c"
Global NewtonCorkscrewGetJointVeloc:Float(corkscrew:Byte Ptr) "c"
Global NewtonCorkscrewGetJointOmega:Float(corkscrew:Byte Ptr) "c"
Global NewtonCorkscrewGetJointForce(corkscrew:Byte Ptr,force:Float Ptr) "c"
Global NewtonCorkscrewCalculateStopAlpha:Float(corkscrew:Byte Ptr,desc:Byte Ptr,angle:Float) "c"
Global NewtonCorkscrewCalculateStopAccel:Float(corkscrew:Byte Ptr,desc:Byte Ptr,position:Float) "c"
Global NewtonConstraintCreateUniversal:Byte Ptr(newtonWorld:Byte Ptr,pivotPoint:Float Ptr,pinDir0:Float Ptr,pinDir1:Float Ptr,childBody:Byte Ptr,parentBody:Byte Ptr) "c"
Global NewtonUniversalSetUserCallback(universal:Byte Ptr,NewtonUniversalCallBack:Int(universal:Byte Ptr,desc:Byte Ptr)) "c"
Global NewtonUniversalGetJointAngle0:Float(universal:Byte Ptr) "c"
Global NewtonUniversalGetJointAngle1:Float(universal:Byte Ptr) "c"
Global NewtonUniversalGetJointOmega0:Float(universal:Byte Ptr) "c"
Global NewtonUniversalGetJointOmega1:Float(universal:Byte Ptr) "c"
Global NewtonUniversalGetJointForce(universal:Byte Ptr,force:Float Ptr) "c"
Global NewtonUniversalCalculateStopAlpha0:Float(universal:Byte Ptr,desc:Byte Ptr,angle:Float) "c"
Global NewtonUniversalCalculateStopAlpha1:Float(universal:Byte Ptr,desc:Byte Ptr,angle:Float) "c"
Global NewtonConstraintCreateUpVector:Byte Ptr(newtonWorld:Byte Ptr,pinDir:Float Ptr,body:Byte Ptr) "c"
Global NewtonUpVectorGetPin(upVector:Byte Ptr,pin:Float Ptr) "c"
Global NewtonUpVectorSetPin(upVector:Byte Ptr,pin:Byte Ptr) "c"
Global NewtonConstraintCreateUserJoint:Byte Ptr(newtonWorld:Byte Ptr,maxDOF:Int,NewtonUserBilateralCallBack(userJoint:Byte Ptr,timestep:Float,threadIndex:Int),NewtonUserBilateralGetInfoCallBack(userJoint:Byte Ptr,info:Byte Ptr),childBody:Byte Ptr,parentBody:Byte Ptr) "c"
Global NewtonUserJointSetFeedbackCollectorCallback(joint:Byte Ptr,NewtonUserBilateralCallBack(userJoint:Byte Ptr,timestep:Float,threadIndex:Int)) "c"
Global NewtonUserJointAddLinearRow(joint:Byte Ptr,pivot0:Byte Ptr,pivot1:Byte Ptr,dir:Byte Ptr) "c"
Global NewtonUserJointAddAngularRow(joint:Byte Ptr,relativeAngle:Float,dir:Byte Ptr) "c"
Global NewtonUserJointAddGeneralRow(joint:Byte Ptr,jacobian0:Byte Ptr,jacobian1:Byte Ptr) "c"
Global NewtonUserJointSetRowMinimumFriction(joint:Byte Ptr,friction:Float) "c"
Global NewtonUserJointSetRowMaximumFriction(joint:Byte Ptr,friction:Float) "c"
Global NewtonUserJointSetRowAcceleration(joint:Byte Ptr,acceleration:Float) "c"
Global NewtonUserJointSetRowSpringDamperAcceleration(joint:Byte Ptr,springK:Float,springD:Float) "c"
Global NewtonUserJointSetRowStiffness(joint:Byte Ptr,stiffness:Float) "c"
Global NewtonUserJointGetRowForce:Float(joint:Byte Ptr,row:Int) "c"
Global NewtonMeshCreate:Byte Ptr() "c"
Global NewtonMeshCreateFromCollision:Byte Ptr(collision:Byte Ptr) "c"
Global NewtonMeshDestroy(NewtonMeshmesh:Byte Ptr) "c"
Global NewtonMeshCalculateVertexNormals(mesh:Byte Ptr,angleInRadians:Float) "c"
Global NewtonMeshApplySphericalMapping(mesh:Byte Ptr,material:Int) "c"
Global NewtonMeshApplyBoxMapping(mesh:Byte Ptr,front:Int,side:Int,top:Int) "c"
Global NewtonMeshApplyCylindricalMapping(mesh:Byte Ptr,cylinderMaterial:Int,capMaterial:Int) "c"
Global NewtonMeshPlaneClip:Int(mesh:Byte Ptr,plane:Float Ptr,textureProjectionMatrix:Float Ptr,meshOut:Byte Ptr,maxMeshCount:Int,capMaterial:Int) "c"
Global NewtonMeshBeginFace(mesh:Byte Ptr) "c"
Global NewtonMeshAddFace(mesh:Byte Ptr,vertexCount:Int,vertex:Float Ptr,strideInBytes:Int,materialIndex:Int) "c"
Global NewtonMeshEndFace(mesh:Byte Ptr) "c"
Global NewtonMeshGetVertexCount:Int(mesh:Byte Ptr) "c"
Global NewtonMeshGetVertexStreams(mesh:Byte Ptr,vertexStrideInByte:Int,vertex:Float Ptr,normalStrideInByte:Int,normal:Float Ptr,uvStrideInByte:Int,uv:Float Ptr) "c"
Global NewtonMeshGetIndirectVertexStreams(mesh:Byte Ptr,vertexStrideInByte:Int,vertex:Float Ptr,vertexIndices:Byte Ptr,vertexCount:Byte Ptr,normalStrideInByte:Int,normal:Float Ptr,normalIndices:Byte Ptr,normalCount:Byte Ptr,uvStrideInByte:Int,uv:Float Ptr,uvIndices:Byte Ptr,uvCount:Byte Ptr) "c"
Global NewtonMeshFirstMaterial:Int(mesh:Byte Ptr) "c"
Global NewtonMeshNextMaterial:Int(mesh:Byte Ptr,materialHandle:Int) "c"
Global NewtonMeshMaterialGetMaterial:Int(mesh:Byte Ptr,materialHandle:Int) "c"
Global NewtonMeshMaterialGetIndexCount:Int(mesh:Byte Ptr,materialHandle:Int) "c"
Global NewtonMeshMaterialGetIndexStream(mesh:Byte Ptr,materialHandle:Int,index:Byte Ptr) "c"
Global NewtonMeshMaterialGetIndexStreamShort(mesh:Byte Ptr,materialHandle:Int,index:Byte Ptr) "c"

Function InitNewton:Int()
	Global hLib:Int

	Select hLib
		Case -1 Return
		Case 0 'Continue
		Default Return hLib
	EndSelect
	hLib=LoadLibraryA("Newton.dll")
	If Not hLib
		hLib=-1
		Return
	EndIf

	NewtonCreate=GetProcAddress(hLib,"NewtonCreate")
	NewtonDestroy=GetProcAddress(hLib,"NewtonDestroy")
	NewtonDestroyAllBodies=GetProcAddress(hLib,"NewtonDestroyAllBodies")
	NewtonGetMemoryUsed=GetProcAddress(hLib,"NewtonGetMemoryUsed")
	NewtonUpdate=GetProcAddress(hLib,"NewtonUpdate")
	NewtonInvalidateCache=GetProcAddress(hLib,"NewtonInvalidateCache")
	NewtonCollisionUpdate=GetProcAddress(hLib,"NewtonCollisionUpdate")
	NewtonSetSolverModel=GetProcAddress(hLib,"NewtonSetSolverModel")
	NewtonSetPlatformArchitecture=GetProcAddress(hLib,"NewtonSetPlatformArchitecture")
	NewtonGetPlatformArchitecture=GetProcAddress(hLib,"NewtonGetPlatformArchitecture")
	NewtonSetMultiThreadSolverOnSingleIsland=GetProcAddress(hLib,"NewtonSetMultiThreadSolverOnSingleIsland")
	NewtonSetPerformanceClock=GetProcAddress(hLib,"NewtonSetPerformanceClock")
	NewtonReadPerformanceTicks=GetProcAddress(hLib,"NewtonReadPerformanceTicks")
	NewtonWorldCriticalSectionLock=GetProcAddress(hLib,"NewtonWorldCriticalSectionLock")
	NewtonWorldCriticalSectionUnlock=GetProcAddress(hLib,"NewtonWorldCriticalSectionUnlock")
	NewtonSetThreadsCount=GetProcAddress(hLib,"NewtonSetThreadsCount")
	NewtonGetThreadsCount=GetProcAddress(hLib,"NewtonGetThreadsCount")
	NewtonSetFrictionModel=GetProcAddress(hLib,"NewtonSetFrictionModel")
	NewtonSetMinimumFrameRate=GetProcAddress(hLib,"NewtonSetMinimumFrameRate")
	NewtonSetBodyLeaveWorldEvent=GetProcAddress(hLib,"NewtonSetBodyLeaveWorldEvent")
	NewtonSetWorldSize=GetProcAddress(hLib,"NewtonSetWorldSize")
	NewtonSetIslandUpdateEvent=GetProcAddress(hLib,"NewtonSetIslandUpdateEvent")
	NewtonWorldForEachJointDo=GetProcAddress(hLib,"NewtonWorldForEachJointDo")
	NewtonWorldForEachBodyInAABBDo=GetProcAddress(hLib,"NewtonWorldForEachBodyInAABBDo")
	NewtonWorldSetUserData=GetProcAddress(hLib,"NewtonWorldSetUserData")
	NewtonWorldGetUserData=GetProcAddress(hLib,"NewtonWorldGetUserData")
	NewtonWorldGetVersion=GetProcAddress(hLib,"NewtonWorldGetVersion")
	NewtonWorldRayCast=GetProcAddress(hLib,"NewtonWorldRayCast")
	NewtonWorldConvexCast=GetProcAddress(hLib,"NewtonWorldConvexCast")
	NewtonGetBodyCount=GetProcAddress(hLib,"NewtonGetBodyCount")
	NewtonIslandGetBody=GetProcAddress(hLib,"NewtonIslandGetBody")
	NewtonIslandGetBodyAABB=GetProcAddress(hLib,"NewtonIslandGetBodyAABB")
	NewtonMaterialCreateGroupID=GetProcAddress(hLib,"NewtonMaterialCreateGroupID")
	NewtonMaterialGetDefaultGroupID=GetProcAddress(hLib,"NewtonMaterialGetDefaultGroupID")
	NewtonMaterialDestroyAllGroupID=GetProcAddress(hLib,"NewtonMaterialDestroyAllGroupID")
	NewtonMaterialGetUserData=GetProcAddress(hLib,"NewtonMaterialGetUserData")
	NewtonMaterialSetSurfaceThickness=GetProcAddress(hLib,"NewtonMaterialSetSurfaceThickness")
	NewtonMaterialSetContinuousCollisionMode=GetProcAddress(hLib,"NewtonMaterialSetContinuousCollisionMode")
	NewtonMaterialSetCollisionCallback=GetProcAddress(hLib,"NewtonMaterialSetCollisionCallback")
	NewtonMaterialSetDefaultSoftness=GetProcAddress(hLib,"NewtonMaterialSetDefaultSoftness")
	NewtonMaterialSetDefaultElasticity=GetProcAddress(hLib,"NewtonMaterialSetDefaultElasticity")
	NewtonMaterialSetDefaultCollidable=GetProcAddress(hLib,"NewtonMaterialSetDefaultCollidable")
	NewtonMaterialSetDefaultFriction=GetProcAddress(hLib,"NewtonMaterialSetDefaultFriction")
	NewtonWorldGetFirstMaterial=GetProcAddress(hLib,"NewtonWorldGetFirstMaterial")
	NewtonWorldGetNextMaterial=GetProcAddress(hLib,"NewtonWorldGetNextMaterial")
	NewtonWorldGetFirstBody=GetProcAddress(hLib,"NewtonWorldGetFirstBody")
	NewtonWorldGetNextBody=GetProcAddress(hLib,"NewtonWorldGetNextBody")
	NewtonMaterialGetMaterialPairUserData=GetProcAddress(hLib,"NewtonMaterialGetMaterialPairUserData")
	NewtonMaterialGetContactFaceAttribute=GetProcAddress(hLib,"NewtonMaterialGetContactFaceAttribute")
	NewtonMaterialGetBodyCollisionID=GetProcAddress(hLib,"NewtonMaterialGetBodyCollisionID")
	NewtonMaterialGetContactNormalSpeed=GetProcAddress(hLib,"NewtonMaterialGetContactNormalSpeed")
	NewtonMaterialGetContactForce=GetProcAddress(hLib,"NewtonMaterialGetContactForce")
	NewtonMaterialGetContactPositionAndNormal=GetProcAddress(hLib,"NewtonMaterialGetContactPositionAndNormal")
	NewtonMaterialGetContactTangentDirections=GetProcAddress(hLib,"NewtonMaterialGetContactTangentDirections")
	NewtonMaterialGetContactTangentSpeed=GetProcAddress(hLib,"NewtonMaterialGetContactTangentSpeed")
	NewtonMaterialSetContactSoftness=GetProcAddress(hLib,"NewtonMaterialSetContactSoftness")
	NewtonMaterialSetContactElasticity=GetProcAddress(hLib,"NewtonMaterialSetContactElasticity")
	NewtonMaterialSetContactFrictionState=GetProcAddress(hLib,"NewtonMaterialSetContactFrictionState")
	NewtonMaterialSetContactFrictionCoef=GetProcAddress(hLib,"NewtonMaterialSetContactFrictionCoef")
	NewtonMaterialSetContactNormalAcceleration=GetProcAddress(hLib,"NewtonMaterialSetContactNormalAcceleration")
	NewtonMaterialSetContactNormalDirection=GetProcAddress(hLib,"NewtonMaterialSetContactNormalDirection")
	NewtonMaterialSetContactTangentAcceleration=GetProcAddress(hLib,"NewtonMaterialSetContactTangentAcceleration")
	NewtonMaterialContactRotateTangentDirections=GetProcAddress(hLib,"NewtonMaterialContactRotateTangentDirections")
	NewtonCreateNull=GetProcAddress(hLib,"NewtonCreateNull")
	NewtonCreateSphere=GetProcAddress(hLib,"NewtonCreateSphere")
	NewtonCreateBox=GetProcAddress(hLib,"NewtonCreateBox")
	NewtonCreateCone=GetProcAddress(hLib,"NewtonCreateCone")
	NewtonCreateCapsule=GetProcAddress(hLib,"NewtonCreateCapsule")
	NewtonCreateCylinder=GetProcAddress(hLib,"NewtonCreateCylinder")
	NewtonCreateChamferCylinder=GetProcAddress(hLib,"NewtonCreateChamferCylinder")
	NewtonCreateConvexHull=GetProcAddress(hLib,"NewtonCreateConvexHull")
	NewtonCreateConvexHullFromMesh=GetProcAddress(hLib,"NewtonCreateConvexHullFromMesh")
	NewtonCreateConvexHullModifier=GetProcAddress(hLib,"NewtonCreateConvexHullModifier")
	NewtonConvexHullModifierGetMatrix=GetProcAddress(hLib,"NewtonConvexHullModifierGetMatrix")
	NewtonConvexHullModifierSetMatrix=GetProcAddress(hLib,"NewtonConvexHullModifierSetMatrix")
	NewtonCollisionIsTriggerVolume=GetProcAddress(hLib,"NewtonCollisionIsTriggerVolume")
	NewtonCollisionSetAsTriggerVolume=GetProcAddress(hLib,"NewtonCollisionSetAsTriggerVolume")
	NewtonConvexCollisionSetUserID=GetProcAddress(hLib,"NewtonConvexCollisionSetUserID")
	NewtonConvexCollisionGetUserID=GetProcAddress(hLib,"NewtonConvexCollisionGetUserID")
	NewtonConvexCollisionCalculateVolume=GetProcAddress(hLib,"NewtonConvexCollisionCalculateVolume")
	NewtonConvexCollisionCalculateInertialMatrix=GetProcAddress(hLib,"NewtonConvexCollisionCalculateInertialMatrix")
	NewtonCollisionMakeUnique=GetProcAddress(hLib,"NewtonCollisionMakeUnique")
	NewtonReleaseCollision=GetProcAddress(hLib,"NewtonReleaseCollision")
	NewtonAddCollisionReference=GetProcAddress(hLib,"NewtonAddCollisionReference")
	NewtonCreateCompoundCollision=GetProcAddress(hLib,"NewtonCreateCompoundCollision")
	NewtonCreateCompoundCollisionFromMesh=GetProcAddress(hLib,"NewtonCreateCompoundCollisionFromMesh")
	NewtonCreateUserMeshCollision=GetProcAddress(hLib,"NewtonCreateUserMeshCollision")
	NewtonCreateSceneCollision=GetProcAddress(hLib,"NewtonCreateSceneCollision")
	NewtonSceneCollisionCreateProxy=GetProcAddress(hLib,"NewtonSceneCollisionCreateProxy")
	NewtonSceneCollisionDestroyProxy=GetProcAddress(hLib,"NewtonSceneCollisionDestroyProxy")
	NewtonSceneProxySetMatrix=GetProcAddress(hLib,"NewtonSceneProxySetMatrix")
	NewtonSceneProxyGetMatrix=GetProcAddress(hLib,"NewtonSceneProxyGetMatrix")
	NewtonCreateCollisionFromSerialization=GetProcAddress(hLib,"NewtonCreateCollisionFromSerialization")
	NewtonCollisionSerialize=GetProcAddress(hLib,"NewtonCollisionSerialize")
	NewtonCollisionGetInfo=GetProcAddress(hLib,"NewtonCollisionGetInfo")
	NewtonCreateHeightFieldCollision=GetProcAddress(hLib,"NewtonCreateHeightFieldCollision")
	NewtonCreateTreeCollision=GetProcAddress(hLib,"NewtonCreateTreeCollision")
	NewtonTreeCollisionSetUserRayCastCallback=GetProcAddress(hLib,"NewtonTreeCollisionSetUserRayCastCallback")
	NewtonTreeCollisionBeginBuild=GetProcAddress(hLib,"NewtonTreeCollisionBeginBuild")
	NewtonTreeCollisionAddFace=GetProcAddress(hLib,"NewtonTreeCollisionAddFace")
	NewtonTreeCollisionEndBuild=GetProcAddress(hLib,"NewtonTreeCollisionEndBuild")
	NewtonTreeCollisionGetFaceAtribute=GetProcAddress(hLib,"NewtonTreeCollisionGetFaceAtribute")
	NewtonTreeCollisionSetFaceAtribute=GetProcAddress(hLib,"NewtonTreeCollisionSetFaceAtribute")
	NewtonTreeCollisionGetVertexListIndexListInAABB=GetProcAddress(hLib,"NewtonTreeCollisionGetVertexListIndexListInAABB")
	NewtonStaticCollisionSetDebugCallback=GetProcAddress(hLib,"NewtonStaticCollisionSetDebugCallback")
	NewtonCollisionPointDistance=GetProcAddress(hLib,"NewtonCollisionPointDistance")
	NewtonCollisionClosestPoint=GetProcAddress(hLib,"NewtonCollisionClosestPoint")
	NewtonCollisionCollide=GetProcAddress(hLib,"NewtonCollisionCollide")
	NewtonCollisionCollideContinue=GetProcAddress(hLib,"NewtonCollisionCollideContinue")
	NewtonCollisionSupportVertex=GetProcAddress(hLib,"NewtonCollisionSupportVertex")
	NewtonCollisionRayCast=GetProcAddress(hLib,"NewtonCollisionRayCast")
	NewtonCollisionCalculateAABB=GetProcAddress(hLib,"NewtonCollisionCalculateAABB")
	NewtonCollisionForEachPolygonDo=GetProcAddress(hLib,"NewtonCollisionForEachPolygonDo")
	NewtonGetEulerAngle=GetProcAddress(hLib,"NewtonGetEulerAngle")
	NewtonSetEulerAngle=GetProcAddress(hLib,"NewtonSetEulerAngle")
	NewtonCalculateSpringDamperAcceleration=GetProcAddress(hLib,"NewtonCalculateSpringDamperAcceleration")
	NewtonCreateBody=GetProcAddress(hLib,"NewtonCreateBody")
	NewtonDestroyBody=GetProcAddress(hLib,"NewtonDestroyBody")
	NewtonBodyAddForce=GetProcAddress(hLib,"NewtonBodyAddForce")
	NewtonBodyAddTorque=GetProcAddress(hLib,"NewtonBodyAddTorque")
	NewtonBodyCalculateInverseDynamicsForce=GetProcAddress(hLib,"NewtonBodyCalculateInverseDynamicsForce")
	NewtonBodySetMatrix=GetProcAddress(hLib,"NewtonBodySetMatrix")
	NewtonBodySetMatrixRecursive=GetProcAddress(hLib,"NewtonBodySetMatrixRecursive")
	NewtonBodySetMassMatrix=GetProcAddress(hLib,"NewtonBodySetMassMatrix")
	NewtonBodySetMaterialGroupID=GetProcAddress(hLib,"NewtonBodySetMaterialGroupID")
	NewtonBodySetContinuousCollisionMode=GetProcAddress(hLib,"NewtonBodySetContinuousCollisionMode")
	NewtonBodySetJointRecursiveCollision=GetProcAddress(hLib,"NewtonBodySetJointRecursiveCollision")
	NewtonBodySetOmega=GetProcAddress(hLib,"NewtonBodySetOmega")
	NewtonBodySetVelocity=GetProcAddress(hLib,"NewtonBodySetVelocity")
	NewtonBodySetForce=GetProcAddress(hLib,"NewtonBodySetForce")
	NewtonBodySetTorque=GetProcAddress(hLib,"NewtonBodySetTorque")
	NewtonBodySetCentreOfMass=GetProcAddress(hLib,"NewtonBodySetCentreOfMass")
	NewtonBodySetLinearDamping=GetProcAddress(hLib,"NewtonBodySetLinearDamping")
	NewtonBodySetAngularDamping=GetProcAddress(hLib,"NewtonBodySetAngularDamping")
	NewtonBodySetUserData=GetProcAddress(hLib,"NewtonBodySetUserData")
	NewtonBodySetCollision=GetProcAddress(hLib,"NewtonBodySetCollision")
	NewtonBodyGetSleepState=GetProcAddress(hLib,"NewtonBodyGetSleepState")
	NewtonBodyGetAutoSleep=GetProcAddress(hLib,"NewtonBodyGetAutoSleep")
	NewtonBodySetAutoSleep=GetProcAddress(hLib,"NewtonBodySetAutoSleep")
	NewtonBodyGetFreezeState=GetProcAddress(hLib,"NewtonBodyGetFreezeState")
	NewtonBodySetFreezeState=GetProcAddress(hLib,"NewtonBodySetFreezeState")
	NewtonBodySetTransformCallback=GetProcAddress(hLib,"NewtonBodySetTransformCallback")
	NewtonBodySetDestructorCallback=GetProcAddress(hLib,"NewtonBodySetDestructorCallback")
	NewtonBodySetForceAndTorqueCallback=GetProcAddress(hLib,"NewtonBodySetForceAndTorqueCallback")
	NewtonBodyGetForceAndTorqueCallback=GetProcAddress(hLib,"NewtonBodyGetForceAndTorqueCallback")
	NewtonBodyGetUserData=GetProcAddress(hLib,"NewtonBodyGetUserData")
	NewtonBodyGetWorld=GetProcAddress(hLib,"NewtonBodyGetWorld")
	NewtonBodyGetCollision=GetProcAddress(hLib,"NewtonBodyGetCollision")
	NewtonBodyGetMaterialGroupID=GetProcAddress(hLib,"NewtonBodyGetMaterialGroupID")
	NewtonBodyGetContinuousCollisionMode=GetProcAddress(hLib,"NewtonBodyGetContinuousCollisionMode")
	NewtonBodyGetJointRecursiveCollision=GetProcAddress(hLib,"NewtonBodyGetJointRecursiveCollision")
	NewtonBodyGetMatrix=GetProcAddress(hLib,"NewtonBodyGetMatrix")
	NewtonBodyGetRotation=GetProcAddress(hLib,"NewtonBodyGetRotation")
	NewtonBodyGetMassMatrix=GetProcAddress(hLib,"NewtonBodyGetMassMatrix")
	NewtonBodyGetInvMass=GetProcAddress(hLib,"NewtonBodyGetInvMass")
	NewtonBodyGetOmega=GetProcAddress(hLib,"NewtonBodyGetOmega")
	NewtonBodyGetVelocity=GetProcAddress(hLib,"NewtonBodyGetVelocity")
	NewtonBodyGetForce=GetProcAddress(hLib,"NewtonBodyGetForce")
	NewtonBodyGetTorque=GetProcAddress(hLib,"NewtonBodyGetTorque")
	NewtonBodyGetForceAcc=GetProcAddress(hLib,"NewtonBodyGetForceAcc")
	NewtonBodyGetTorqueAcc=GetProcAddress(hLib,"NewtonBodyGetTorqueAcc")
	NewtonBodyGetCentreOfMass=GetProcAddress(hLib,"NewtonBodyGetCentreOfMass")
	NewtonBodyGetLinearDamping=GetProcAddress(hLib,"NewtonBodyGetLinearDamping")
	NewtonBodyGetAngularDamping=GetProcAddress(hLib,"NewtonBodyGetAngularDamping")
	NewtonBodyGetAABB=GetProcAddress(hLib,"NewtonBodyGetAABB")
	NewtonBodyGetFirstJoint=GetProcAddress(hLib,"NewtonBodyGetFirstJoint")
	NewtonBodyGetNextJoint=GetProcAddress(hLib,"NewtonBodyGetNextJoint")
	NewtonBodyGetFirstContactJoint=GetProcAddress(hLib,"NewtonBodyGetFirstContactJoint")
	NewtonBodyGetNextContactJoint=GetProcAddress(hLib,"NewtonBodyGetNextContactJoint")
	NewtonContactJointGetFirstContact=GetProcAddress(hLib,"NewtonContactJointGetFirstContact")
	NewtonContactJointGetNextContact=GetProcAddress(hLib,"NewtonContactJointGetNextContact")
	NewtonContactJointGetContactCount=GetProcAddress(hLib,"NewtonContactJointGetContactCount")
	NewtonContactJointRemoveContact=GetProcAddress(hLib,"NewtonContactJointRemoveContact")
	NewtonContactGetMaterial=GetProcAddress(hLib,"NewtonContactGetMaterial")
	NewtonBodyAddBuoyancyForce=GetProcAddress(hLib,"NewtonBodyAddBuoyancyForce")
	NewtonBodyAddImpulse=GetProcAddress(hLib,"NewtonBodyAddImpulse")
	NewtonJointGetUserData=GetProcAddress(hLib,"NewtonJointGetUserData")
	NewtonJointSetUserData=GetProcAddress(hLib,"NewtonJointSetUserData")
	NewtonJointGetBody0=GetProcAddress(hLib,"NewtonJointGetBody0")
	NewtonJointGetBody1=GetProcAddress(hLib,"NewtonJointGetBody1")
	NewtonJointGetInfo=GetProcAddress(hLib,"NewtonJointGetInfo")
	NewtonJointGetCollisionState=GetProcAddress(hLib,"NewtonJointGetCollisionState")
	NewtonJointSetCollisionState=GetProcAddress(hLib,"NewtonJointSetCollisionState")
	NewtonJointGetStiffness=GetProcAddress(hLib,"NewtonJointGetStiffness")
	NewtonJointSetStiffness=GetProcAddress(hLib,"NewtonJointSetStiffness")
	NewtonDestroyJoint=GetProcAddress(hLib,"NewtonDestroyJoint")
	NewtonJointSetDestructor=GetProcAddress(hLib,"NewtonJointSetDestructor")
	NewtonConstraintCreateBall=GetProcAddress(hLib,"NewtonConstraintCreateBall")
	NewtonBallSetUserCallback=GetProcAddress(hLib,"NewtonBallSetUserCallback")
	NewtonBallGetJointAngle=GetProcAddress(hLib,"NewtonBallGetJointAngle")
	NewtonBallGetJointOmega=GetProcAddress(hLib,"NewtonBallGetJointOmega")
	NewtonBallGetJointForce=GetProcAddress(hLib,"NewtonBallGetJointForce")
	NewtonBallSetConeLimits=GetProcAddress(hLib,"NewtonBallSetConeLimits")
	NewtonConstraintCreateHinge=GetProcAddress(hLib,"NewtonConstraintCreateHinge")
	NewtonHingeSetUserCallback=GetProcAddress(hLib,"NewtonHingeSetUserCallback")
	NewtonHingeGetJointAngle=GetProcAddress(hLib,"NewtonHingeGetJointAngle")
	NewtonHingeGetJointOmega=GetProcAddress(hLib,"NewtonHingeGetJointOmega")
	NewtonHingeGetJointForce=GetProcAddress(hLib,"NewtonHingeGetJointForce")
	NewtonHingeCalculateStopAlpha=GetProcAddress(hLib,"NewtonHingeCalculateStopAlpha")
	NewtonConstraintCreateSlider=GetProcAddress(hLib,"NewtonConstraintCreateSlider")
	NewtonSliderSetUserCallback=GetProcAddress(hLib,"NewtonSliderSetUserCallback")
	NewtonSliderGetJointPosit=GetProcAddress(hLib,"NewtonSliderGetJointPosit")
	NewtonSliderGetJointVeloc=GetProcAddress(hLib,"NewtonSliderGetJointVeloc")
	NewtonSliderGetJointForce=GetProcAddress(hLib,"NewtonSliderGetJointForce")
	NewtonSliderCalculateStopAccel=GetProcAddress(hLib,"NewtonSliderCalculateStopAccel")
	NewtonConstraintCreateCorkscrew=GetProcAddress(hLib,"NewtonConstraintCreateCorkscrew")
	NewtonCorkscrewSetUserCallback=GetProcAddress(hLib,"NewtonCorkscrewSetUserCallback")
	NewtonCorkscrewGetJointPosit=GetProcAddress(hLib,"NewtonCorkscrewGetJointPosit")
	NewtonCorkscrewGetJointAngle=GetProcAddress(hLib,"NewtonCorkscrewGetJointAngle")
	NewtonCorkscrewGetJointVeloc=GetProcAddress(hLib,"NewtonCorkscrewGetJointVeloc")
	NewtonCorkscrewGetJointOmega=GetProcAddress(hLib,"NewtonCorkscrewGetJointOmega")
	NewtonCorkscrewGetJointForce=GetProcAddress(hLib,"NewtonCorkscrewGetJointForce")
	NewtonCorkscrewCalculateStopAlpha=GetProcAddress(hLib,"NewtonCorkscrewCalculateStopAlpha")
	NewtonCorkscrewCalculateStopAccel=GetProcAddress(hLib,"NewtonCorkscrewCalculateStopAccel")
	NewtonConstraintCreateUniversal=GetProcAddress(hLib,"NewtonConstraintCreateUniversal")
	NewtonUniversalSetUserCallback=GetProcAddress(hLib,"NewtonUniversalSetUserCallback")
	NewtonUniversalGetJointAngle0=GetProcAddress(hLib,"NewtonUniversalGetJointAngle0")
	NewtonUniversalGetJointAngle1=GetProcAddress(hLib,"NewtonUniversalGetJointAngle1")
	NewtonUniversalGetJointOmega0=GetProcAddress(hLib,"NewtonUniversalGetJointOmega0")
	NewtonUniversalGetJointOmega1=GetProcAddress(hLib,"NewtonUniversalGetJointOmega1")
	NewtonUniversalGetJointForce=GetProcAddress(hLib,"NewtonUniversalGetJointForce")
	NewtonUniversalCalculateStopAlpha0=GetProcAddress(hLib,"NewtonUniversalCalculateStopAlpha0")
	NewtonUniversalCalculateStopAlpha1=GetProcAddress(hLib,"NewtonUniversalCalculateStopAlpha1")
	NewtonConstraintCreateUpVector=GetProcAddress(hLib,"NewtonConstraintCreateUpVector")
	NewtonUpVectorGetPin=GetProcAddress(hLib,"NewtonUpVectorGetPin")
	NewtonUpVectorSetPin=GetProcAddress(hLib,"NewtonUpVectorSetPin")
	NewtonConstraintCreateUserJoint=GetProcAddress(hLib,"NewtonConstraintCreateUserJoint")
	NewtonUserJointSetFeedbackCollectorCallback=GetProcAddress(hLib,"NewtonUserJointSetFeedbackCollectorCallback")
	NewtonUserJointAddLinearRow=GetProcAddress(hLib,"NewtonUserJointAddLinearRow")
	NewtonUserJointAddAngularRow=GetProcAddress(hLib,"NewtonUserJointAddAngularRow")
	NewtonUserJointAddGeneralRow=GetProcAddress(hLib,"NewtonUserJointAddGeneralRow")
	NewtonUserJointSetRowMinimumFriction=GetProcAddress(hLib,"NewtonUserJointSetRowMinimumFriction")
	NewtonUserJointSetRowMaximumFriction=GetProcAddress(hLib,"NewtonUserJointSetRowMaximumFriction")
	NewtonUserJointSetRowAcceleration=GetProcAddress(hLib,"NewtonUserJointSetRowAcceleration")
	NewtonUserJointSetRowSpringDamperAcceleration=GetProcAddress(hLib,"NewtonUserJointSetRowSpringDamperAcceleration")
	NewtonUserJointSetRowStiffness=GetProcAddress(hLib,"NewtonUserJointSetRowStiffness")
	NewtonUserJointGetRowForce=GetProcAddress(hLib,"NewtonUserJointGetRowForce")
	NewtonMeshCreate=GetProcAddress(hLib,"NewtonMeshCreate")
	NewtonMeshCreateFromCollision=GetProcAddress(hLib,"NewtonMeshCreateFromCollision")
	NewtonMeshDestroy=GetProcAddress(hLib,"NewtonMeshDestroy")
	NewtonMeshCalculateVertexNormals=GetProcAddress(hLib,"NewtonMeshCalculateVertexNormals")
	NewtonMeshApplySphericalMapping=GetProcAddress(hLib,"NewtonMeshApplySphericalMapping")
	NewtonMeshApplyBoxMapping=GetProcAddress(hLib,"NewtonMeshApplyBoxMapping")
	NewtonMeshApplyCylindricalMapping=GetProcAddress(hLib,"NewtonMeshApplyCylindricalMapping")
	NewtonMeshPlaneClip=GetProcAddress(hLib,"NewtonMeshPlaneClip")
	NewtonMeshBeginFace=GetProcAddress(hLib,"NewtonMeshBeginFace")
	NewtonMeshAddFace=GetProcAddress(hLib,"NewtonMeshAddFace")
	NewtonMeshEndFace=GetProcAddress(hLib,"NewtonMeshEndFace")
	NewtonMeshGetVertexCount=GetProcAddress(hLib,"NewtonMeshGetVertexCount")
	NewtonMeshGetVertexStreams=GetProcAddress(hLib,"NewtonMeshGetVertexStreams")
	NewtonMeshGetIndirectVertexStreams=GetProcAddress(hLib,"NewtonMeshGetIndirectVertexStreams")
	NewtonMeshFirstMaterial=GetProcAddress(hLib,"NewtonMeshFirstMaterial")
	NewtonMeshNextMaterial=GetProcAddress(hLib,"NewtonMeshNextMaterial")
	NewtonMeshMaterialGetMaterial=GetProcAddress(hLib,"NewtonMeshMaterialGetMaterial")
	NewtonMeshMaterialGetIndexCount=GetProcAddress(hLib,"NewtonMeshMaterialGetIndexCount")
	NewtonMeshMaterialGetIndexStream=GetProcAddress(hLib,"NewtonMeshMaterialGetIndexStream")
	NewtonMeshMaterialGetIndexStreamShort=GetProcAddress(hLib,"NewtonMeshMaterialGetIndexStreamShort")

	Return hLib
EndFunction
